package com.hmall.fegin.clients;


import com.hmall.common.dto.FiltersDTO;
import com.hmall.common.dto.FiltersVO;
import com.hmall.common.dto.Item;
import com.hmall.common.dto.PageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("itemservice")
public interface ItemClient {
    @GetMapping("/item/{id}")
    Item getItemById(@PathVariable("id") Long id);

    @GetMapping("/item/category")
     FiltersVO getFilter(@RequestParam("category") String category);

    @GetMapping("/item/categorys")
    PageDTO<Item> list1(@RequestBody FiltersDTO filtersDTO);

    @PutMapping("/item/stock/{itemId}/{num}")
    void updateStock(@PathVariable Long itemId,@PathVariable Integer num );

    @GetMapping("/item/getCategory")
    List<String> getlist();

    @GetMapping("/item/getBrand")
    List<String> getBrandList();
}